package com.by.service.impl;

import com.by.bean.Organize;
import com.by.common.bean.PageBean;
import com.by.mapper.OrganizeMapper;
import com.by.service.OrganizeService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author HY
 * @version 1.0
 * @description
 * @date 2025/2/17
 * @since JDK21
 */
@Service
public class OrganizeServiceImpl implements OrganizeService {

    @Autowired
    OrganizeMapper organizeMapper;


    @Override
    public List<Organize> query() {

        return organizeMapper.query();



    }

    @Override
    public int save(Organize organize) {
        return  organizeMapper.save(organize);

    }

    @Override
    public int update(Organize organize) {
        return  organizeMapper.update(organize);

    }

    @Override
    public int delete(int id) {
        return organizeMapper.delete(id);

    }

    @Override
    public List<Map> query(String name) {
        return organizeMapper.queryByName(name);
    }

    @Override
    public List<Map> queryNameByID(int id) {
        return organizeMapper.queryNameByID(id);
    }
}
